<template>
  <div>
    <table border="2px" width="50%">
      <thead>
        <tr>
          <th>姓名</th>
          <th>年龄</th>
          <th>性别</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item, index) in list" :key="index">
          <td>{{ item.name }}</td>
          <td>{{ item.age }}</td>
          <td>{{ item.gender }}</td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
// import axios from "axios";
import { axiosApi } from "./js/api";
export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    axiosApi.get1().then((val) => {
      console.log(val);
      this.list = val;
    });
    // axiosApi.post1(this.from).then((val) => {
    //   console.log(val);
    //   this.list = val;
    // });
  },
};
</script>

<style lang="scss" scoped>
</style>